<?if($p_link):?>
	<div class="btn-group">
		<a href="<?=site_url('search/by/lastname/'.$active);?>" class="btn <?=$active_type == 'lastname' ? 'disabled' : 'btn-primary'?>">By Last Name</a>
		<a href="<?=site_url('search/by/firstname/'.$active);?>" class="btn <?=$active_type == 'firstname' ? 'disabled' : 'btn-primary'?>">By First Name</a>
	</div>
<?endif;?>
<?if($links):?>
	<div class="pagination pagination-centered pagination-mini">
	  <ul>
	    <?foreach($links as $v):?>
	    	<li><a href="<?=site_url($p_link.'/'.$v);?>"  class="<?=$active==$v?'btn btn-inverse btn-mini':'';?>">
	    		<strong><?=strtoupper($v);?></strong></a>
	    	</li>
	    <?endforeach;?>
	  </ul>
	</div>
	<hr class="clearfix">
<?endif;?>
<?=$pagnatelinks;?>
<div class="row">
	<?if($students):?>
		<table class="table">
			<thead>
				<tr>
					<td>Student's Name</td>
					<td>Gender</td>
					<td>Age</td>
					<td>Grade Level</td>
				</tr>
			</thead>
			<?foreach($students as $k => $v):
				$link_id = __link($v->enrollment_id);
			?>
				<tr class="<?=$link_id;?>">
					<td><a href="<?=site_url('profile/student/'.$v->enrollment_id);?>" target="_blank"><?=ucwords(strtolower($v->fullname));?></a></td>
					<td><?=ucwords(strtolower($v->gender));?></td>
					<td><?=age($v->dob);?></td>
					<td>
						<?=$v->level_desc;?>
					</td>
				</tr>
			<?endforeach;?>
		</table>
	<?endif;?>
</div>
<span id="loader" url="<?=image_url('load.gif');?>"></span>
<script type="text/javascript" src="<?php echo script_url('custom/updatesection');?>"></script>
<script src="<?=script_url('custom/teacherauthgrades');?>"></script>